package com.yans.views
{
	import com.yans.maps.ColorConfig;
	import com.yans.maps.MapConfig;
	
	import flash.display.Graphics;

	public class ItemDataVo
	{
		
		public var indexX:int;
		public var indexY:int;
		public var x:Number;
		public var y:Number;
		private var walkable:int;
		private var half_trans:int;
		private var safePlace:int = 0;
		private var stallPlace:int;
		
		public function getType():int{
			return (((((this.stallPlace * MapConfig.STALL_PLACE) | (this.safePlace * MapConfig.SAFE_PLACE)) | (this.half_trans * MapConfig.HALF_TRANSPARENT)) | this.walkable));
		}
		public function setType(_arg1:int):void{
			this.walkable = (_arg1 & MapConfig.WALKABLE);
			this.half_trans = ((((_arg1 & MapConfig.HALF_TRANSPARENT) == 0)) ? 0 : 1);
			this.safePlace = ((((_arg1 & MapConfig.SAFE_PLACE) == 0)) ? 0 : 1);
			this.stallPlace = ((((_arg1 & MapConfig.STALL_PLACE) == 0)) ? 0 : 1);
		}
		public function drawGraphics(_arg1:Graphics):void{
			MapConfig.drawQueue.push(this);
		}
		
		public function draw(_arg1:Graphics):void {
			var _local2:int = this.getType();
			if (_local2 == MapConfig.BLOCK)
			{
				return;
			};
			_arg1.lineStyle(1, ColorConfig.TYPE_LINE_COLOR);
			var _local3:uint = ColorConfig.getColorByType(_local2);
			_arg1.beginFill(_local3, 0.4);
			_arg1.drawRect(this.x, this.y, MapConfig.TILE_SIZE, MapConfig.TILE_SIZE);
			_arg1.endFill(); 
		}
	}
}